package com.jk.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jk.dao.TemDictDataMapper;
import com.jk.dto.TemDictData;
import com.jk.service.TemDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yzf
 * @version 1.0
 * @ClassName TemDictDataServiceImpl
 * @program: office
 * @description: TODO
 * @date 2025/2/13 14:59
 */
@Service
public class TemDictDataServiceImpl implements TemDictDataService {

    @Autowired
    private TemDictDataMapper temDictDataMapper;

    @Override
    public List<TemDictData> findDictByType(String dictType) {
        QueryWrapper<TemDictData> query = new QueryWrapper<>();
        if (dictType != null && !"".equals(dictType)){
            query.eq("dict_type",dictType);
        }

        return temDictDataMapper.selectList(query);
    }
}
